<?php
/**
 * +----------------------------------------------------------------------
 * | summer framework
 * +----------------------------------------------------------------------
 * | Copyright (c) 2020 https://github.com/suframe/think-admin All rights reserved.
 * +----------------------------------------------------------------------
 * | Author: summer <806115620@qq.com>  2020/3/30 13:55
 * +----------------------------------------------------------------------
 */

namespace app\mall\enum;


class StockTypeEnum extends Base
{
    public const ALL = 'all';
    public const STORE = 'store';

    public static function toZhArray(): array
    {
        return [
            self::ALL => '统一库存',
            self::STORE => '门店库存',
        ];
    }

    public static function getKeyAll()
    {
        return static::ALL;
    }

    public static function getKeyStore()
    {
        return static::STORE;
    }

    public function isStore()
    {
        return $this->getValue() == self::STORE;
    }

}